#ifndef ENTITYMANAGER_H
#define ENTITYMANAGER_H

#include "Entity.h"

class SceneManager;
class EntityManager : public EntityListener
{
public:
	EntityManager(SceneManager* scene_manager);
	~EntityManager(void);

	Entity* GetEntity(unsigned int id);
	Entity* GetEntity(Entity* entity);

	void AddEntity(Entity* entity);

	void RemoveEntity(Entity* entity);
	void RemoveEntity(unsigned int id);

	void Update(float deltatime);

private:
	inline void Remove(Entity* entity);

	std::vector<Entity*> m_entities;
	std::vector<Entity*> m_queue_list;
	SceneManager* m_scene_manager;
};

#endif //ENTITYMANAGER_H